#include "memory.h"

#ifndef L1_CACHE_LINE_SIZE
#define L1_CACHE_LINE_SIZE 64
#endif


// Use functions defined in stdlib.h
// Check http://msdn.microsoft.com/en-us/library/fs9stz4e(v=vs.80).aspx for further details

void * __restrict AllocAligned(size_t size) {
	return _aligned_malloc(size, L1_CACHE_LINE_SIZE);
}

void FreeAligned(void *ptr) {
	if(!ptr)
		return;
	_aligned_free(ptr);
}

